{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "from CGH import *"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 入射光束的特征宽度, 无需给出波长, 单位为 um\n",
    "sigma = 103\n",
    "\n",
    "CGH(sigma, AdvHG(-1), AdvHG(1)).show()\n",
    "#   ^      ^          ^         ^\n",
    "# 特征宽度| 模式1   |   模式2   |  方法, show, save 和 result\n",
    "\n",
    "\n",
    "# show(): 弹出算好的 CGH 的预览, 用 Pillow 实现\n",
    "# save(file): file 为保存的路径, 同样由 Pillow 实现, 注意要保存成 bmp 格式\n",
    "# result(): 返回计算好的 CGH 矩阵 (灰度值), 可以做进一步处理\n",
    "\n",
    "# P.S. 在这里 AdvHG 代指 Zhou2023 文章中的 +- 模式, AdvHG(-1) 表示 - 模式, AdvHG(1) 表示 + 模式\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "base",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.11.10"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
